#include "Blocks/SnowBlock.h"
#include "Blocks/SnowballBlock.h"

namespace PocketSurvival
{
    int32_t SnowBlock::getIndex()
    {
        return Index();
    }
    const std::string &SnowBlock::getBlockName()
    {
        static std::string blockName = "SnowBlock";
        return blockName;
    }

    void SnowBlock::getDropValues(int32_t oldValue, int32_t newValue, int32_t toolLevel, std::vector<BlockDropValue> &dropValues)
    {
		if (toolLevel >= RequiredToolLevel)
		{
			int32_t num = m_random.getInt(1, 3);
			for (int32_t i = 0; i < num; i++)
			{
                dropValues.emplace_back(Terrain::MakeBlockValue(SnowballBlock::Index()), 1 );
			}
		}
    }
    bool SnowBlock::isFaceTransparent(int32_t face, int32_t value)
    {
        return face != 5;
    }
    const std::vector<BoundingBox> &SnowBlock::getCustomCollisionBoxes(int32_t value)
    {
        return BlockConstans::snowCollisionBoxes;
    }


} // namespace PocketSurvival
